package com.example.examsystem2.service.serviceImpl;

import com.example.examsystem2.mapper.ResourceMapper;
import com.example.examsystem2.service.ResourceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ResourceServiceImpl implements ResourceService {

    @Resource
    private ResourceMapper resourceMapper;

    public void setResourceMapper(ResourceMapper resourceMapper) {
        this.resourceMapper = resourceMapper;
    }

    @Override
    public int save_upload_resource(com.example.examsystem2.entity.Resource resource) {
        return resourceMapper.save_upload_resource(resource);
    }


    @Override
    public List<com.example.examsystem2.entity.Resource> get_all_resource() {
        return resourceMapper.get_all_resource();
    }

    @Override
    public int update_resource_state_by_r_id(com.example.examsystem2.entity.Resource resource) {
        return resourceMapper.update_resource_state_by_r_id(resource);
    }

    @Override
    public int del_resource_state_by_r_id(int r_id) {
        return resourceMapper.del_resource_state_by_r_id(r_id);
    }

    @Override
    public List<com.example.examsystem2.entity.Resource> get_resource_by_r_state() {
        return resourceMapper.get_resource_by_r_state();
    }

    @Override
    public int num6() {
        return resourceMapper.num6();
    }
}
